# -*- coding: utf8 -*-
from selenium import webdriver
import time

url = 'https://mm.taobao.com/search_tstar_model.htm'

driver = webdriver.PhantomJS(executable_path='/path/to/phantomjs/bin/phantomjs')
driver.set_window_size(1920, 400)
driver.get(url)
driver.get_screenshot_as_file('mm.jpg')

time.sleep(3)
driver.find_element_by_link_text('下一页 >').click()
time.sleep(3)
driver.get_screenshot_as_file('mm2.jpg')

js = 'window.document.body.scrollTop=10000'
driver.execute_script(js)
time.sleep(3)
driver.get_screenshot_as_file('mm3.jpg')

driver.close()